import Vue from 'vue'
import Router from 'vue-router'

import index from '@/views/index'
import newBlog from '@/views/newBlog'


import searchBlog from '@/views/searchBlog'
import blog from '@/views/blog'
import myBlog from '@/views/myBlog'
import editBlog from '@/views/editBlog'
import notfound from '@/views/notfound'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index
    },

 
    {
      path: '/newBlog',
      name: 'newBlog',
      component: newBlog
    },
  

    
    {
      path: '/searchBlog/:searchTxt',
      name: 'searchBlog',
      component: searchBlog
    },
    {
      path: '/blog/:blogId',
      name: 'blog',
      component: blog
    },
    {
      path: '/myBlog',
      name: 'myBlog',
      component: myBlog
    },
    {
      path: '/editBlog/:blogId',
      name: 'editBlog',
      component: editBlog
    },
    {
      path: '*',
      name: 'notfound',
      component: notfound
    }
  ]
})
